<template>
	<view class="warp">
		<view class="form">
			<uni-forms :modelValue="querform"  label-width ="260" label-position="left" :border="false">
		<uni-forms-item class="formitem" label="活动名称" name="activityTitle" >
			<input   v-model="querform.activityTitle"  type="text" placeholder="请输入活动名称">
		</uni-forms-item>
		<uni-forms-item label="活动开始时间" name="activityStartTime"    >
			<uni-datetime-picker :border="false" type="date" v-model="querform.activityStartTime"  />
		</uni-forms-item>
		<uni-forms-item label="活动结束时间" name="activityEndTime"  >
			<uni-datetime-picker :border="false" type="date" v-model="querform.activityEndTime" />
		</uni-forms-item>
		</uni-forms>
		</view>
		<view class="banner">
			<view class="uni-margin-wrap">
						<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
							:duration="duration">
							<swiper-item v-for="(item,index) in bannerimage" :key="index">
								<view class="swiper-item uni-bg-red" style="background-color: red;">
								<image style="width: 100%;" :src="item.bannerContent" mode="widthFix"></image>	
								</view>
							</swiper-item>
							
							<swiper-item v-if="bannerimage.length==0" v-for="(item,index) in 2" :key="index">
								<view class="swiper-item uni-bg-red" style="background-color: red;">
								 <image style="width: 100%;" src="https://q4.itc.cn/q_70/images01/20240203/1a19caf6540f419885c06754e6e117bf.jpeg" mode="heightFix"></image>
								</view>
							</swiper-item>
						</swiper>
			</view>
			<view class="title_b">
				banner配置
			</view>
			<view class="add">
				<view class="image"v-for="(item,index) in bannerimage" :key="index">
					<image  style="width: 150rpx;height: 100rpx;":src="item.bannerContent" mode="widthFix"></image>
				<uni-icons @click="deleteimg(1,index)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
				</view>
				<!--  -->
				<view class="addimage" @click="uploadCover(1)">
					<uni-icons	 type="camera" size="30rpx"></uni-icons>
				</view>
			</view>
		</view>
		<!-- 模块一 文字介绍 -->
		<view class="modey_f">
			<view class="f_title">
				<input v-model="modeyf.contentSmallTilte" type="text" placeholder="会议标题(例:会议介绍)" />
			</view>
			<view class="text">
				<textarea :maxlength="500" style="width: 100%;" v-model="modeyf.contentList[0].contentContent" placeholder='填写介绍内容' name="" id="" cols="30" rows="10">
					
				</textarea>
				</view>
		</view>
		<!-- 模块二 -->
		<view class="modey_s">
			<view class="s_title">
				<input v-model="modeys.contentSmallTilte" type="text" placeholder="多图展示标题(例:会议嘉宾)" />
			</view>
			<view class="s_image" style="overflow: auto;  display: -webkit-flex;  display: flex;">
				<view class="image"v-for="(item,index) in modeys.contentList" :key="index">
					<image  style="width: 200rpx;height: 160rpx;":src="item.contentContent" mode=""></image>
				     <view class="" style="text-align: center;">
				     	{{item.contentExtra}}
				     </view>
				   <uni-icons @click="deleteimg(2,index)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
				</view>
				<!--uploadCover(2)  -->
				<view class="addimage"@click="openporp">
					<uni-icons type="camera" size="30"></uni-icons>
				</view>
			</view>
		</view>
		<!-- 模块三 -->
		<view class="modey_t">
			<view class="t_title">
				<input v-model="modeyt.contentSmallTilte" type="text" placeholder="标题" />
			</view>
			<view class="image_lang">
				<view v-if="modeyt.contentList.length==0" class="addimage"@click="uploadCover(3)">
					<uni-icons type="camera" size="30"></uni-icons>
				</view>
				<view v-else class="image">
					<image  :src="modeyt.contentList[0].contentContent"  mode="widthFix"></image>
					   <uni-icons @click="deleteimg(4,index)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
					
				</view>
				</view>
		</view>
		<!-- 模块四 -->
		<view class="modeyfou">
			<view class="s_title">
				<input v-model="modeyfou.contentSmallTilte" type="text" placeholder="标题" />
			</view>
			<view class="s_image" style="overflow: auto;  display: -webkit-flex;  display: flex;">
				<view class="image"v-for="(item,index) in modeyfou.contentList" :key="index">
					<image  style="width: 300rpx;height: 160rpx;":src="item.contentContent" mode=""></image>
				<uni-icons @click="deleteimg(3,index)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
				</view>
				<view class="addimage" @click="uploadCover(4)">
					<uni-icons type="camera" size="30"></uni-icons>
				</view>
			</view>
		</view>
		<!-- 微官网封面 -->
		<view class="title" style="background-color: #fff;margin-top: 10rpx;padding: 10rpx;">
			微官网活动图
		</view>
		<view class="cover">
			
			<view v-if="!querform.activityCover" class="addimage"@click="uploadCover(7)">
				<uni-icons type="camera" size="30"></uni-icons>
			</view>
			<view v-else class="image">
				<image  :src="querform.activityCover"  mode="widthFix"></image>
				   <uni-icons @click="deleteimg(7)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
				
			</view>
		</view>
		<view class="title" style="background-color: #fff;margin-top: 10rpx;padding: 10rpx;">
			微官网活动列表封面图
		</view>
		<view class="coverlist">
			<view v-if="!querform.activityCoverList" class="addimage"@click="uploadCover(8)">
				<uni-icons type="camera" size="30"></uni-icons>
			</view>
			<view v-else class="image">
				<image  :src="querform.activityCoverList"  mode="widthFix"></image>
				   <uni-icons @click="deleteimg(8)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
				
			</view>
		</view>
		<!-- 分享活动图 -->
		<view class="title" style="background-color: #fff;margin-top: 10rpx;padding: 10rpx;">
			分享活动图(5:4)
		</view>
		<view class="coverlist">
			<view v-if="!querform.shareImage" class="addimage"@click="uploadCover(9)">
				<uni-icons type="camera" size="30"></uni-icons>
			</view>
			<view v-else class="image">
				<image  :src="querform.shareImage"  mode="widthFix"></image>
				   <uni-icons @click="deleteimg(9)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
				
			</view>
		</view>
		<!-- 活动位置 -->
		<view class="map">
			<view class="title">
			 活动地址配置
			</view>
			<view class="right_b" @click="choosemap">
				配置
			</view>
		</view>
		<view v-if="querform.address" class="" style="background-color: #fff; padding: 10rpx;margin-top: 10rpx;">
			<view class="">
				<span style="font-size: 28rpx;font-weight: 550;">地址:</span>{{querform.address}}
			</view>
			<view class="mapsimage">
				<image :src="querform.addressImage" mode="widthFix"></image>
			<uni-icons @click="deleteimg(6)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
			</view>
		</view>
		<!-- 签到活动 -->
		<view class="sign">
			<view class="title">
			 签到活动配置
			</view>
			<view v-if="!signshow" class="right_b" @click="choosesign">
				开启
			</view>
			<view v-else class="right_b" @click="choosesign">
				关闭
			</view>
		</view>
		<!-- 投票活动配置 -->
		<view class="vote">
			<view class="title">
				投票活动配置
			</view>
			<view v-if="!voteshow" class="right_b" @click="choosevote">
				开启
			</view>
			<view v-else class="right_b" @click="choosevote">
				关闭
			</view>
		</view>
		<!-- 投票配置 -->
		<view class="votevalue">
			<view style="background-color: #f5f5f5;color: #cecece;">开启投票后需要配置投票次数和顶部banner背景</view>
			<view class="value" v-if="voteshow">
				<uni-forms-item  class="formitem" label-width='260' label="投票机会次数" name="activityTitle" >
					<input  v-model="querform.activityExtra2"  type="text" placeholder="请输入投票次数">
				</uni-forms-item>
				
			</view>
			<view v-if="voteshow" class="voteimage" style="background-color: #fff;padding: 20rpx 30rpx;text-align: center;">
				<view class="" style="padding: 10rpx 30rpx;">
					投票背景图
				</view>
				<view v-if="!querform.activityExtra1" class="addimages"@click="uploadCover(5)">
						<uni-icons type="camera" size="30"></uni-icons>
					</view>
					<view v-else class="image">
						<image   :src="querform.activityExtra1"  mode="widthFix"></image>
					<uni-icons @click="deleteimg(5,1)" class="icon" color="#fff" type="closeempty" size="30"></uni-icons>
					</view>
				
			</view>
		
		</view>
	<!-- 拼团活动商品选择 -->
	<view class="group">
		<view class="title">
			拼团商品
		</view>
		<view class="right_b" @click="selectgood(1)">
			选择
		</view>
	</view>
	<view class="live_user_tab_content">
		<videoReleaseGoods :goodsData="selGoods" :addCartIcon="imgUrl+'svideo/add_cart.png'"
			:eyeIcon="imgUrl+'svideo/eye.png'" @delGoods="delGoods" />
	</view>
	<view class="group">
		<view class="title">
			门票虚拟商品
		</view>
		<view class="right_b" @click="selectgood(2)">
			选择
		</view>
	</view>
	<view class="live_user_tab_content">
		<videoReleaseGoods :goodsData="xselecteggod" :addCartIcon="imgUrl+'svideo/add_cart.png'"
			:eyeIcon="imgUrl+'svideo/eye.png'" @delGoods="delGoodsx" />
	</view>
	<view class="shop">
		<view class="title">
			协同商户
		</view>
		<view class="right_b" @click="seletshop()">
			选择
		</view>
	</view>
	<view class="shoplist" v-if="shoplist.length!=0">
		<view class="item" v-for="(item,index) in shoplist" :key="index">
			<span style="margin-right: 10rpx;color: #282828">协同商户{{index+1}} :</span>
			<span>{{item.userName}}</span>
		</view>
	</view>
	<!-- 活动价格 -->
	<!-- <view class="price">
		<view class="title">
			活动费用
		</view>
		<view v-if="!priceshow" class="right_b" @click="chooseprice">
			开启
		</view>
		<view v-else class="right_b" @click="chooseprice">
			关闭
		</view>
	</view> -->
<!-- 	<view class="pricetext" v-if="priceshow">
		<uni-forms-item  label-width='260' label="活动价格" name="activityTitle" >
			<input style="color: #cecece;" v-model="querform.activityMoney"  type="text" placeholder="请输入活动价格/元">
		</uni-forms-item>
	</view> -->
	<view class="submit">
        <view class="button" @click="submit">
        		提交
        </view>
	</view>
	<uni-popup ref="popup" type="center"   background-color="#fff">
	<view class="" style="background-color: #fff;width: 700rpx;padding: 10rpx;border-radius: 10rpx;">
		<view class="image">
			<image style="width: 200rpx;height: 160rpx;border-radius: 10rpx; " v-if="modeyssrc" :src="modeyssrc" mode=""></image>
			<uni-icons v-if="!modeyssrc" type="camera" size="30" @click="uploadCover(2)"></uni-icons>
		</view>
		<view class="inpt" style="margin-top: 20rpx;margin-bottom: 15rpx;">
			 
			<input v-model="context" type="text" placeholder="请输入描述" />
		</view>
		<view class="bottombtn" style="display: flex;justify-content: space-between;border-top: 2rpx solid #c3c3c3;">
			<view @click="closepop" class="" style="width: 50%;text-align: center;height: 80rpx;line-height: 80rpx;border-right: 2rpx solid #c3c3c3;;">
				取消
			</view>
			<view @click="subpop" class="" style="width: 50%;text-align: center;height: 80rpx;line-height: 80rpx;">
				确认
			</view>
		</view>
	</view>
	</uni-popup>
	<uni-popup ref="mappopup" type="center"   background-color="#fff">
	<view class="" style="background-color: #fff;width: 700rpx;padding: 10rpx;border-radius: 10rpx;">
		<view class="">
			上传位置截图：
		</view>
		<view class="image" style="border-bottom: 2rpx solid #cecece;">
			<image style="width: 200rpx;height: 160rpx;border-radius: 10rpx; " v-if="querform.addressImage" :src="querform.addressImage" mode=""></image>
			<uni-icons v-if="!querform.addressImage" type="camera" size="30" @click="uploadCover(6)"></uni-icons>
		</view>
		<view class="inpt" style="margin-top: 20rpx;margin-bottom: 15rpx;">
			 
			<input v-model="querform.address" type="text" placeholder="地址(例:安徽省合肥市包河区上海路188号)" />
		</view>
		<view class="bottombtn" style="display: flex;justify-content: space-between;border-top: 2rpx solid #c3c3c3;">
			<view @click="closemappop" class="" style="width: 50%;text-align: center;height: 80rpx;line-height: 80rpx;border-right: 2rpx solid #c3c3c3;;">
				取消
			</view>
			<view @click="submappop" class="" style="width: 50%;text-align: center;height: 80rpx;line-height: 80rpx;">
				确认
			</view>
		</view>
	</view>
	</uni-popup>
	 
		<view class="" style="margin-bottom: 25%;">
			
			
		</view>
		
	</view>
</template>

<script>
	import videoReleaseGoods from "../../extra/component/video/videoReleaseGoods.vue";
	import {
	  	mapState,
	  } from 'vuex';
	import uniSwiperDot from '@/components/uni-swiper-dot/uni-swiper-dot.vue'
	import uniDatetimePicker from "../uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"
	import uniForms from "../uni-forms/components/uni-forms/uni-forms.vue"
	 import uniFormsItem from "../uni-forms/components/uni-forms-item/uni-forms-item.vue"
	import uniPopup from '@/components/uni-popup/uni-popup.vue'
	import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
	export default {
		components:{
			uniDatetimePicker,
			uniForms,
			uniFormsItem,
			videoReleaseGoods,
			uniPopup,
			uniPopupMessage,
			uniPopupDialog,	
		},
		data() {
			return {
					selGoods: [], //已选中的商品列表
					xselecteggod:[],//虚拟商品
					imgUrl: getApp().globalData.imgUrl,
				   duration: 500,
				   background: ['color1', 'color2', 'color3'],
				   indicatorDots: true,
				   autoplay: true,
				   interval: 2000,
				   modeyf:{ contentSmallTilte:'',titleSequence:1,
				   contentList:[{contentContent:'',contentType:'文字',}],
				   },
				   modeys:{ contentSmallTilte:'',titleSequence:2,
				   contentList:[],
				   },
				  modeyt:{ contentSmallTilte:'',titleSequence:3,
				   contentList:[],
				   },
				   modeyfou:{ contentSmallTilte:'',titleSequence:4,
				    contentList:[],
				    },
				  
				   bannerimage:[],
				   querform:{
					   bannerList:[],//banner
					   titleVOList:[],//内容
					   activityTitle:'',//标题
					   activityStartTime:null,//开始时间
					   activityEndTime:null,//结束时间
					   activityExtra1:null,//背景图
					   activityExtra2:null,//次数
					   activityExtra3:null,//拼团产品id
					   goodsId:null,//商品id
					   activityMoney:null,//活动费用
					   // activityState:2,//
					   activityType:null,//活动
					   partnerList:[],//协同商户
					   address:'',//活动地址
					   addressImage:'',//地址示意图
					   activityCover:'',
					   activityCoverList:'',
					   shareImage:'',//分享活动图
					   
				   },
				   activityinfo:{},
				   voteshow:false,
				   priceshow:false,
				   signshow:false,
				   shoplist:[],
				   modeyssrc:'',//弹框图片展示
				   context:'',//弹框内容
			};
		},
		computed:{
			
		 ...mapState(['userInfo','userCenterData']),	
		},
		 onLoad(e) {
			 if(e){
				 this.getactivityinfo(e)
			 }
		 	
		 },
		methods:{
			getactivityinfo(val){
				this.$request({
					url:'v3/activity/front/activity/detail/'+val.id,
					method:'GET'
				}).then(res=>{
					this.activityinfo=res.data
					this.querform.activityId=this.activityinfo.activityId
					this.bannerimage=this.activityinfo.bannerList
					
					this.querform.activityTitle=this.activityinfo.activityTitle
					this.querform.activityEndTime=this.activityinfo.activityEndTime
					this.querform.activityStartTime=this.activityinfo.activityStartTime,
					this.querform.activityExtra1=this.activityinfo.activityExtra1
					this.querform.activityExtra2=this.activityinfo.activityExtra2
					this.querform.activityExtra3=this.activityinfo.activityExtra3
					this.querform.goodsId=this.activityinfo.goodsId
					this.querform.productId=this.activityinfo.productId
					this.shoplist=this.activityinfo.partnerList
					this.querform.activityCover=this.activityinfo.activityCover
					this.querform.activityCoverList=this.activityinfo.activityCoverList
					this.querform.shareImage=this.activityinfo.shareImage
					if(this.activityinfo.activityExtra1){
						this.voteshow=true
					}
					if(this.activityinfo.activityType=='true'){
						this.signshow=true
					}
					
					this.activityinfo.titleVOList.forEach(item=>{
						if(item.titleSequence==1){
							this.modeyf=item
						}else if(item.titleSequence==2){
							this.modeys=item
						}else if(item.titleSequence==3){
							this.modeyt=item
						}else if(item.titleSequence==4){
							this.modeyfou=item
						}
					})
				})
			},
			deleteimg(num,index){
				if(num==1){
					// banner
					this.bannerimage.splice(index,1)
				}else if(num==2){
					console.log(num);
					this.modeys.contentList.splice(index,1)
				}else if(num==3){
					this.modeyfou.contentList.splice(index,1)
				}else if(num==4){
					this.modeyt.contentList.splice(index,1)
				}else if(num==5){
					this.querform.activityExtra1=null
				}else if(num==7){
					this.querform.activityCover=null
				}else if(num==8){
					this.querform.activityCoverList=null
				}else if(num==6){
					this.querform.addressImage=null
					this.querform.address=null
				}else if(num==9){
					this.querform.shareImage=null
				}
			},
			// 开启活动
			choosesign(){
				if(this.signshow){
					this.signshow=false
					this.querform.activityType=false
				}else{
					this.signshow=true
					this.querform.activityType=true
				}
			},
			// 选择投票活动
			choosevote(){
				if(this.voteshow){
					this.voteshow=false
					this.querform.activityExtra1=null
					this.querform.activityExtra2=0
				}else{
					this.voteshow=true
				}
				
				// uni.navigateTo({
				// 	url:'/standard/chooseactivity/chooseactivity'
				// })
			},
			// 金额
			chooseprice(){
				if(this.priceshow){
					this.priceshow=false
					this.querform.activityMoney=null
				}else{
					this.priceshow=true
				}
			},
			selectgood(val){
				if(val==1){
					let query={
						bindGoodsNum: 1,
						selGoods: JSON.stringify(this.selGoods),
						
					}
					
					this.$Router.push({
						path: '/extra/svideo/svideoSeleGoods',
						query
					})
				}else{
					let query={
						bindGoodsNum: 1,
						selGoods: JSON.stringify(this.selGoods),
						type:'xuni'
					}
					
					this.$Router.push({
						path: '/extra/svideo/svideoSeleGoods',
						query
					})
				}
				
			},
			seletshop(){
				this.$Router.push({
					path:'/extra/chooseshop/chooseshop'
				})
			},
			// 提交活动
			 submit(){
				 this.querform.bannerList=this.bannerimage//轮播图
				 this.querform.titleVOList.push(this.modeyf)
				  this.querform.titleVOList.push(this.modeys)
				   this.querform.titleVOList.push(this.modeyt)
				    this.querform.titleVOList.push(this.modeyfou)
					this.querform.partnerList=this.shoplist
					if(this.selGoods.length!=0){
						this.querform.goodsId=this.selGoods[0].goodsId
						this.querform.activityExtra3=this.selGoods[0].productId
					}
					if(this.xselecteggod.length!=0){
						this.querform.productId=this.xselecteggod[0].productId
					}
				 if(this.querform.activityId){
					 // 修改
					 this.$request({
						 url:'v3/activity/front/activity/edit',
						 method:"POST",
						 header:{
						 	'Content-Type': 'application/json'
						 },
						 data:this.querform,
					 }).then(res=>{
						if(res.state==200){
							uni.navigateBack({delta:1})
						}
					})
				 }else{
					 // 新增
					
					 this.$request({
					 	url:'v3/activity/front/activity/add',
					 	method:"POST",
					 	header:{
					 		'Content-Type': 'application/json'
					 	},
					 	data:this.querform,
					 	
					 }).then(res=>{
					 	if(res.state==200){
					 		uni.navigateBack({delta:1})
					 	}
					 })
				 }
				 // 数据处理
				
				
				   
			 },
			 //删除商品
			 delGoods(options) {
			 	this.selGoods.map((item, index) => {
			 		let iPid = item.defaultProductId ? item.defaultProductId : item.productId
			 		if (iPid == options.productId) {
			 			this.selGoods.splice(index, 1)
			 		}
			 	})
			 	uni.setStorageSync('selGoods', this.selGoods)
			 },
			 // 删除虚拟商品
			 delGoodsx(options) {
			 	this.xselecteggod.map((item, index) => {
			 		let iPid = item.defaultProductId ? item.defaultProductId : item.productId
			 		if (iPid == options.productId) {
			 			this.xselecteggod.splice(index, 1)
			 		}
			 	})
			 	uni.setStorageSync('xselecteggod', this.xselecteggod)
			 },
			 //模块二
			 openporp(){
				 // 打开弹框
				 this.$refs.popup.open()
			 },
			 // 取消事件
			 closepop(){
				  this.modeys.contentList.splice(this.modeys.contentList.length-1,1)
				 this.$refs.popup.close()
				this.modeyssrc=''
				this.context=''
			 },
			 subpop(){
				 let num=
				 this.modeys.contentList[this.modeys.contentList.length-1].contentExtra=this.context
				 this.$refs.popup.close()
				 this.modeyssrc=''
				 this.context=''
				
			 },
			 // 配置地图
			 choosemap(){
				  this.$refs.mappopup.open()
			 },
			 // 关闭弹框
			 closemappop(){
				 this.$refs.mappopup.close()
				 this.querform.addressImage=''
				 this.querform.address=''
			 },
			 submappop(){
				 this.$refs.mappopup.close()
			 },
			// 上传
			uploadCover(type) {
				let {
					cover
				} = this;
				let that = this;
				let key = uni.getStorageSync('token');
				uni.chooseImage({
					count: 1,
					sizeType: ['original', 'compressed'],
					//可选择原图或压缩后的图片
					sourceType: ['album', 'camera'],
					//可选择性开放访问相册、相机
					success: res => {
						uni.uploadFile({
							url: getApp().globalData.apiUrl + 'v3/oss/front/upload',
							filePath: res.tempFilePaths[0],
							name: 'file',
							formData: {
								'source': 'goods',
							},
			  header: {
			      Authorization:  'Bearer '+that.userInfo.access_token
			   },
							success: resup => {
								// #ifndef MP-ALIPAY||MP-BAIDU
								resup = JSON.parse(resup.data);
								// #endif
								// #ifdef MP-ALIPAY||MP-BAIDU
								resup = resup.data
								// #endif
			
								if (resup.state == 200) {
									if(type==1){
										that.bannerimage.push({bannerContent:resup.data.url,bannerSequence:that.bannerimage.length+1})
									}else if(type==2){
										that.modeys.contentList.push({contentContent:resup.data.url,contentType:'图片'})
									   that.modeyssrc=resup.data.url
									}else if(type==3){
										that.modeyt.contentList.push({contentContent:resup.data.url,contentType:'图片'})
									}else if(type==4){
										that.modeyfou.contentList.push({contentContent:resup.data.url,contentType:'图片'})
									}else if(type==5){
										that.querform.activityExtra1=resup.data.url
									}else if(type==6){
										that.querform.addressImage=resup.data.url
									}else if(type==7){
										that.querform.activityCover=resup.data.url
									}else if(type==8){
									  that.querform.activityCoverList=resup.data.url	
									}else if(type==9){
										that.querform.shareImage=resup.data.url	
									}
									// //获取到image-cropper实例
									// that.cover = resup.data;
									// that.cover.video_path = resup.data.path;
									// that.cover.video_url = resup.data.url;
									// that.cover.height = resup.data.height;
									// that.cover.width = resup.data.width
								}
							}
						});
					}
				});
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	page{
		width: 750rpx;
		margin: 0 auto;
		background: #F5F5F5;
	}
.warp{
	overflow: hidden;
	.form{
		margin-top: 10rpx;
		background-color: #fff;
		 padding: 10rpx 30rpx;
		 /deep/.uni-forms-item{
		 	display: flex !important;
		 	align-items: center !important;
		 }
	}
	.banner{
		margin-top: 10rpx;
		padding-top: 10rpx;
		background-color: #fff;
		.uni-margin-wrap {
				width: 690rpx;
				width: 100%;
			}
			.swiper {
				height: 300rpx;
			}
			.swiper-item {
				display: block;
				height: 300rpx;
				line-height: 300rpx;
				text-align: center;
			}
			.swiper-list {
				margin-top: 40rpx;
				margin-bottom: 0;
			}
			.title_b{
				padding: 0 30rpx;
				margin-top: 10rpx;
				font-size: 28rpx;
				font-weight: 550;
			}
			.add{
				padding: 10rpx 30rpx;
				display: flex;
				// justify-content: space-between;
				flex-wrap: wrap;
				.image{
					margin-bottom: 10rpx;
					width: 150rpx;
					height: 100rpx;
					margin-right: 10rpx;
					background-color: #F5F5F5;
					position: relative;
					.icon{
						width: 40rpx;
						height: 40rpx;
						line-height: 40rpx;
						text-align: center;
						position: absolute;
						right: 0;
						top: -10rpx;
					background-color: #ff841f;
					}
				}
				.addimage{
					width: 100rpx;
					height: 100rpx;
					text-align: center;
					line-height: 100rpx;
					background-color: #F5F5F5;
				}
			}
	}
	// 文字模块
	.modey_f{
		margin-top: 10rpx;
		background-color: #fff;
		 padding: 10rpx 30rpx;
		.f_title{
			padding: 10rpx 0;
			margin-top: 10rpx;
			font-size: 28rpx;
			font-weight: 550;
		}
	}
	// 图片模块
	.modey_s{
		margin-top: 10rpx;
		background-color: #fff;
		 padding: 10rpx 30rpx;
		 .s_title{
			 padding: 10rpx 0;
			 margin-top: 10rpx;
			 font-size: 28rpx;
			 font-weight: 550;
		 }
		 .s_image{
			 display: flex;
			 .image{
				 position: relative;
				 margin-right: 10rpx;
				 .icon{
				 	width: 40rpx;
				 	height: 40rpx;
				 	line-height: 40rpx;
				 	text-align: center;
				 	position: absolute;
				 	right: 0;
				 	top: -10rpx;
				 background-color: #ff841f;
				 }
			 }
			.addimage{
				// margin-right: 20rpx;
				width: 200rpx;
				padding: 0 60rpx;
				height: 160rpx;
				text-align: center;
				line-height: 160rpx;
				background-color: #F5F5F5;
			}
		 }
	}
	// 海报模块
	.modey_t{
		margin-top: 10rpx;
		background-color: #fff;
		 padding: 10rpx 30rpx;
		 .t_title{
			 padding: 10rpx 0;
			 margin-top: 10rpx;
			 font-size: 28rpx;
			 font-weight: 550;
		 }
		 .image_lang{
			 text-align: center;
			 .image{
				 position: relative;
				 .icon{
				 	width: 40rpx;
				 	height: 40rpx;
				 	line-height: 40rpx;
				 	text-align: center;
				 	position: absolute;
				 	right: 0;
				 	top: -10rpx;
				 background-color: #ff841f;
				 }
			 }
			 .addimage{
			 	// margin-right: 20rpx;
			 	width: 200rpx;
			 	padding: 0 60rpx;
			 	height: 160rpx;
			 	text-align: center;
			 	line-height: 160rpx;
			 	background-color: #F5F5F5;
			 }
		 }
	}
	// 回顾
	.modeyfou{
		margin-top: 10rpx;
		background-color: #fff;
		 padding: 10rpx 30rpx;
		 
		 .s_title{
			 padding: 10rpx 0;
			 margin-top: 10rpx;
			 font-size: 28rpx;
			 font-weight: 550;
		 }
		 .s_image{
			 display: flex;
			 .image{
				 margin-right: 10rpx;
				 position: relative;
				 .icon{
				 	width: 40rpx;
				 	height: 40rpx;
				 	line-height: 40rpx;
				 	text-align: center;
				 	position: absolute;
				 	right: 0;
				 	top: -10rpx;
				 background-color: #ff841f;
				 }
			 }
			.addimage{
				// margin-right: 20rpx;
				width: 200rpx;
				padding: 0 60rpx;
				height: 160rpx;
				text-align: center;
				line-height: 160rpx;
				background-color: #F5F5F5;
			}
		 }
	}
	// 活动配置
	.coverlist,.cover,.map,.shop,.price,.group,.sign,.vote{
		margin-top: 10rpx;
		background-color: #fff;
		 padding: 10rpx 30rpx;
		 display: flex;
		 justify-content: space-between;
		 .right_b{
			 background-color: #ff841f;
			 color: #fff;
			 padding: 10rpx 20rpx;
			 font-size: 24rpx;
			 border-radius: 32rpx;
		 }
	}
	 
		.mapsimage{
						 position: relative;
						 margin-right: 10rpx;
						 .icon{
						 	width: 40rpx;
						 	height: 40rpx;
						 	line-height: 40rpx;
						 	text-align: center;
						 	position: absolute;
						 	right: 80rpx;
						 	top: 0rpx;
						     background-color: #ff841f;
						 }
		}
	 
	.coverlist,.cover{
		.image{
						 position: relative;
						 margin-right: 10rpx;
						 .icon{
						 	width: 40rpx;
						 	height: 40rpx;
						 	line-height: 40rpx;
						 	text-align: center;
						 	position: absolute;
						 	right: 0;
						 	top: 10rpx;
						     background-color: #ff841f;
						 }
		}
	}
	.votevalue{
		margin-top: 10rpx;
		.voteimage{
			.image{
							 margin-right: 10rpx;
							 position: relative;
							 .icon{
							 	width: 40rpx;
							 	height: 40rpx;
							 	line-height: 40rpx;
							 	text-align: center;
							 	position: absolute;
							 	right: 0;
							 	top: -10rpx;
							 background-color: #ff841f;
							 }
			}
		}
		.value{
			background-color: #fff;
			margin-top: 10rpx;
			/deep/.uni-forms-item{
				display: flex !important;
				align-items: center !important;
			}
		}
		.addimages{
			width: 200rpx;
			padding: 0 60rpx;
			height: 160rpx;
			text-align: center;
			line-height: 160rpx;
			background-color: #F5F5F5;
		}
	}
	.pricetext{
		background-color: #fff;
		margin-top: 10rpx;
		padding: 0rpx 30rpx;
	}
	.shoplist{
		background-color: #fff;
		margin-top: 10rpx;
		color: #ff841f;
		padding: 10rpx 30rpx;
	}
	.submit{
		position: fixed;
		bottom: 10rpx;
		left: 40%;
		
		.button{
			text-align: center;
			width: 150rpx;
			height: 60rpx;
			line-height: 60rpx;
			background-color: #ff841f;
			border-radius: 30rpx;
			color: #fff;
		}
	}
}
</style>
